package entity.bean;

import entity.connector.TimeConvertor;
import java.util.Calendar;

/**
 *
 * @author 52571783
 */
public class Ticket {
    // Data Members
    private int movieID;
    private Calendar time;
    private int rowNo;
    private int colNo;
    private int price;
    private boolean discount;
    
    public Ticket(Show show, int rowNo, int colNo){
        movieID = show.getMovieID();
        time = show.getTime();
        price = show.getPrice();
        this.rowNo = rowNo;
        this.colNo = colNo;
        discount = false;
    }
    
    public Ticket(){
    }
    
    // Setter Functions
    public void setMovieID(int value){
        movieID = value;
    }
    
    public void setTime(Calendar value){
        time = value;
    }
    
    public void setRowNo(int value){
        rowNo = value;
    }
    
    public void setColNo(int value){
        colNo = value;
    }
    
    public void setPrice(int value){
        price = value;
    }
    
    public void setDiscount(boolean value){
        discount = value;
    }
    
    // Getter Functions
    public int getMovieID(){
        return movieID;
    }
    
    public Calendar getTime(){
        return time;
    }
    
    public String getTimeString(){
        return TimeConvertor.printTime(time);
    }
    
    public int getRowNo(){
        return rowNo;
    }
    
    public int getColNo(){
        return colNo;
    }
    
    public int getPrice(){
        return price;
    }
    
    public boolean getDiscount(){
        return discount;
    }
}
